<template>
  <a-row :class="['p-4', `${prefixCls}--box`]" :gutter="10">
    <a-col :xl="6" :lg="8" :md="10" :sm="24" style="flex: 1">
      <a-card :bordered="false" style="height: 100%">
        <Tree title="物料分类名称" @select="onTreeSelect" />
      </a-card>
    </a-col>
    <a-col :xl="18" :lg="16" :md="14" :sm="24" style="flex: 1">
      <a-card :bordered="false" style="height: 100%">
        <MaterialListTable :curtype="curtype"/>
      </a-card>
    </a-col>
  </a-row>
</template>

<script lang="ts" setup name="system-depart-user">
  import { provide, ref } from 'vue';
  import { useDesign } from '/@/hooks/web/useDesign';

  import Tree from './components/custom-Tree/index.vue';
  import MaterialListTable from './BdMaterialclassList.vue';


  const { prefixCls } = useDesign('depart-user');
  provide('prefixCls', prefixCls);

  // 当前选中的部门信息
  let departData = ref({});

  let curtype=ref({})

  let loading = ref<boolean>(false);
  // 部门树列表数据
  let treeData = ref<any[]>([]);

  // 左侧树选择后触发
  function onTreeSelect(data) {
    curtype.value=data
    
    // departData.value = data;
  }

</script>

<style lang="less">
  @import './BasetreeList.less';
</style>
